<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/contact.css" />
<?php
/* @var $this SiteController */
/* @var $model ContactForm */
/* @var $form CActiveForm */

$this->pageTitle=Yii::app()->name . ' - Contact Us';
$this->breadcrumbs=array(
	'Contact',
);
?>

<div class='contact-header '>
 <span class='title'>Contact </span>
 <span class='content'>Fell free to contact us </span>
</div>


<?php if(Yii::app()->user->hasFlash('contact')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php else: ?>

<div class='contact-form'>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
 	
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<div class=' row contact-items'>
			<span class='name left'>Name</span>
			<?php echo $form->textField($model,'name', array('class'=>'right')); ?>
		</div>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<div class='row contact-items'>
			<span class='left email'>Email</span>
			<?php echo $form->textField($model,'email', array('class'=>'right')); ?>
		</div>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<div class=' row contact-items'>
			<span class='left subject'>Subject</span>
			<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128, 'class'=>'right')); ?>
		</div>
		
		<?php echo $form->error($model,'subject'); ?>
	</div>

	<div class="row">
		<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'body'); ?>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<div>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
		<?php echo $form->error($model,'verifyCode'); ?>
	</div>
	<?php endif; ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Submit', array('class'=>'button orange')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
</div>
<?php endif; ?>

<div style='float: right; width: 400px; display: block; border: 1px solid white; border-radius: 5px; height: 340px; padding: 20px; margin-top: 35px; font-size: 14px; line-height: 25px;'>

<center>
To use our services now, please <a class='button' style='text-decoration: none;' href="<?php echo $this->createUrl('site/login');?>">Login</a> if you have registed an account

<br><br><br>

If you haven't account please <a class='button' style='text-decoration: none;' href="<?php echo $this->createUrl('user/register');?>">Register</a> here to access
</center>

</div>